package com.funny.test.components;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

/**
 * @author fanxiao  2022/3/25
 * @since 1.0.0
 */
public class FooBeanFactoryPostProcessor implements BeanFactoryPostProcessor {

	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
		BeanDefinition foo = beanFactory.getBeanDefinition("foo");
		foo.getPropertyValues().addPropertyValue("memberVar", "Hello1");
	}
}